package  
{
	import flare.basic.Scene3D;
	import flare.basic.Viewer3D;
	import flare.loaders.Flare3DLoader;
	import flash.display.Sprite;
	import flash.utils.ByteArray;
	
	/**
	 * ...
	 * @author Ariel Nehmad
	 */
	public class Test15_LoadFromByteArray extends Sprite 
	{
		[Embed(source = '../bin/axis.f3d', mimeType = 'application/octet-stream')]
		private static const Axis:Class;
		
		private var scene:Scene3D;
		
		public function Test15_LoadFromByteArray() 
		{
			scene = new Viewer3D( this );
			scene.camera.setPosition( 0, 0, -20 );
			
			// option 1, load from byte array.
			var loader:Flare3DLoader = new Flare3DLoader( new Axis() );
			
			// option 2, load from class.
			//var loader:Flare3DLoader = new Flare3DLoader( Axis );
			
			//option 3. load from byte array.
			//var loader:Flare3DLoader = new Flare3DLoader( "someOptionalName" );
			//loader.loadBytes( new Axis() );
			
			scene.addChild( loader );
		}
	}

}